import 'package:mziot/app/data/add_device_entity.dart';
import 'package:mziot/generated/json/base/json_convert_content.dart';

AddDeviceEntity $AddDeviceEntityFromJson(Map<String, dynamic> json) {
  final AddDeviceEntity addDeviceEntity = AddDeviceEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    addDeviceEntity.id = id;
  }
  final String? deviceName = jsonConvert.convert<String>(json['deviceName']);
  if (deviceName != null) {
    addDeviceEntity.deviceName = deviceName;
  }
  final bool? isConfigNet = jsonConvert.convert<bool>(json['isConfigNet']);
  if (isConfigNet != null) {
    addDeviceEntity.isConfigNet = isConfigNet;
  }
  final Map? command = jsonConvert.convert<Map>(json['command']);
  if (command != null) {
    addDeviceEntity.command = command;
  }
  return addDeviceEntity;
}

Map<String, dynamic> $AddDeviceEntityToJson(AddDeviceEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['deviceName'] = entity.deviceName;
  data['isConfigNet'] = entity.isConfigNet;
  data['command'] = entity.command;
  return data;
}
